package com.jbp.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jbp.utils.PageUtils;
import com.jbp.utils.Query;

import com.jbp.dao.RoomBlockDao;
import com.jbp.model.RoomBlock;
import com.jbp.service.RoomBlockService;


@Service
public class RoomBlockServiceImpl extends ServiceImpl<RoomBlockDao, RoomBlock> implements RoomBlockService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<RoomBlock> page = this.page(
                new Query<RoomBlock>().getPage(params),
                new QueryWrapper<RoomBlock>()
        );

        return new PageUtils(page);
    }


    @Override
    public List<Integer> getIds(Integer roomId, String type) {
        return baseMapper.getIds(roomId,type);
    }
}
